home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
wb
/
czesc_2
/
ml
/
man
/
dos
/
wait
< prev
Wrap
Text File
|
1993-01-23
|
2KB
|
65 lines
WAIT(1) DOS COMMANDS WAIT(1)
NAME
WAIT : To wait for a few seconds or minutes.
SYNOPSIS
WAIT [<n>] [SEC|SECS] [MIN|MINS] [UNTIL <time>]
TEMPLATE
WAIT ",SEC=SECS/S, MIN=MINS/S, UNTIL/K"
PATH
C:
DESCRIPTION
WAIT as its name suggests, waits for a few seconds or minutes.
WAIT without argument WAITs for 1 second. WAIT N, where N is a number
will WAIT for N seconds. It is possible to specify a number of minutes
to WAIT by adding MIN or MINS after the argument.
With the UNTIL option it is possible to wait up to a given time.
WAIT is useful to launch tasks in the background at specific time,
or at specific intervals.
Wait can be used to wait for the end of a script file. This is
done for example in the default Startup-sequence file. This can be used
when a script file runs another script files and that both of them
access the disk very much. This way, the first script file, can wait
until the second script file has completed at least part of what it
has to do. Typically the first script file will WAIT and the second one
sends it a BREAK signal to inform it that it can continue.
WAIT can also be used to synchronize one or more script files.
OPTIONS
N : the amount of time to wait. By default N is the number of seconds
to wait. N can be followed by SEC or SECS to be more explicit.
If N is followed by MIN or MINS, WAIT will wait for N minutes.
UNTIL: WAIT until the specified time.
SEE ALSO
BREAK, RUN.
EXAMPLE
The following script file can be run in the background to save every
15 minutes all the files on the RAM: disk into the SYS:Rescued_Files
directory. This is one way to minimize the risk of loosing hours of
work because of a GURU.
LAB Loop
WAIT 15 MINS
COPY ram:#? SYS:Rescued_Files ALL
SKIP Loop BACK
This example shows how WAIT can be used to WAIT for the end of another
program through a script:
LaunchScript:
MyProgram ; this is the program we want to run and wait for.
BREAK 1 C ; 1 is the SHELL/CLI number from which this script is RUN.
AnotherProgram ; we don't wait for this one.
The other script:
run execute LaunchScript
WAIT >NIL: 5 MIN ; wait up to 5 MIN or until the BREAK signal send
; by the other script file is received.